﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="IQuery.cs" company="DissingNelleman">
//   
// All rights reserved. </copyright>
// <summary>
//   The i query.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace ServiceLibrary.Services.Queries
{
    using System;
    using System.Runtime.Serialization;

    using NHibernate;

    using ServiceLibrary.Services.Results;

    /// <summary>
    /// The i query.
    /// </summary>
    [DataContract]
// ReSharper disable InconsistentNaming
    public class IQuery
// ReSharper restore InconsistentNaming
    {
        #region Public Properties

        /// <summary>
        /// Gets or sets the settings.
        /// </summary>
        [DataMember]
        public SearchSettings Settings { get; set; }

        #endregion

        #region Public Methods and Operators

        /// <summary>
        /// The execute.
        /// </summary>
        /// <param name="hsession">
        /// The hsession.
        /// </param>
        /// <returns>
        /// The <see cref="IResult"/>.
        /// </returns>
        public virtual IResult Execute(ISession hsession)
        {
            return null;
        }

        /// <summary>
        /// The get derived type.
        /// </summary>
        /// <returns>
        /// The <see cref="Type"/>.
        /// </returns>
        public Type GetDerivedType()
        {
            Type t = this.GetType();

            return t;
        }

        #endregion
    }
}